home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Contributed / SpriteWorld / SpriteWorld Files / Utils / SWApplication.h < prev    next >
Encoding:
Text File  |  2000-10-06  |  1.8 KB  |  59 lines  |  [TEXT/CWIE]

  1. ///--------------------------------------------------------------------------------------
  2. //    SWApplication.h
  3. //
  4. //    Created:    Sunday, April 11, 1993
  5. //    By:        Tony Myles. Extensive modifications by Vern Jensen and Karl Bunker.
  6. //
  7. //    Copyright: © 1993 Tony Myles, All rights reserved worldwide.
  8. ///--------------------------------------------------------------------------------------
  9.  
  10.  
  11. #ifndef __SWAPPLICATION__
  12. #define __SWAPPLICATION__
  13.  
  14.  
  15. #define kNumberOfMoreMastersCalls        3
  16. #define kWindowResID                    128
  17.  
  18. #define kErrorAlertResID                128
  19. #define kCantRunAlertResID                129
  20.  
  21. #define kErrorStringListResID            128
  22. #define kFatalErrorStringIndex            1
  23. #define kCantFindResourceStringIndex    2
  24. #define kOutOfMemoryStringIndex            3
  25. #define kResNotFoundStringIndex            4
  26.  
  27. #define kSeriousDamageString "\pAn error has occurred, and the error string couldn't even be found!"
  28.  
  29. ///--------------------------------------------------------------------------------------
  30. // Macros for ReportIfError and CantFindResource
  31. ///--------------------------------------------------------------------------------------
  32.  
  33. #define FatalError(err)            if (err) ReportError(err, __FILE__, __LINE__);
  34. #define CantFindResource()        DoCantFindResource(__FILE__, __LINE__);
  35.  
  36.  
  37. ///--------------------------------------------------------------------------------------
  38. // Function prototypes
  39. ///--------------------------------------------------------------------------------------
  40.  
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46.  
  47. void    Initialize(short numberOfMasters);
  48. void    ReportError(OSErr err, char* filename, int lineNumber);
  49. void    DoCantFindResource(char* filename, int lineNumber);
  50. void    ErrorAlert(OSErr err, char* filename, int lineNumber, short errorStringIndex);
  51. void    CantRunOnThisMachine( void );
  52.  
  53.  
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57.  
  58.  
  59. #endif /* __SWAPPLICATION__ */